<template>
  <div class="navbar">
    <slot name="left">
      <img src="@/assets/back.png" alt="" />
    </slot>
    <div class="title">{{ title }}</div>
    <slot name="right">
      <div class="right">
        <img src="@/assets/search.png" alt="" />
        <img src="@/assets/ellipsis.png" alt="" />
      </div>
    </slot>
  </div>
  <div class="slot"></div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: "京东",
    },
  },
};
</script>

<style scoped lang="scss">
.slot {
  height: 18vw;
  background-color: #fff;
}
.navbar {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  width: 100vw;
  padding: 5.333333vw 2.667vw;
  display: flex;
  justify-content: space-between;
  background-color: #fff;
  z-index: 100;
  height: 16vw;
  border-bottom: 1px solid #eee;
  .title {
    font-size: 4.266667vw;
  }
  .right {
    img {
      margin: 0 0.533333vw;
    }
  }
  img {
    width: 4.5vw;
    height: 4.5vw;
    object-fit: cover;
  }
}
</style>
